/**
 * 
 */
package cosc617_blackteam;

/**
 * @author Laura
 * A tab decorator that will randomly add a coupon onto the tab
 */
public class CouponTabDecorator extends SimpleTabDecorator {

	public CouponTabDecorator(I_Tab tab){
		super(tab);
	}
	
	/* 
	 * This will randomly add a coupon to some patrons bills
	 * (non-Javadoc)
	 * @see cosc617_blackteam.SimpleTabDecorator#makeRegularTab()
	 */
	public String makeRegularTab(){
		String output = super.makeRegularTab();
		if((int)(Math.random() * 11) == 10)
			output += "\n ****WINNER****\n" +
					"Present this coupon to get $5 off your next visit\n";
		return output;
	}
}
